In computer or data processing systems, decimal operations are usually executed in a densely packed decimal (DPD) format as defined in the IEEE 754-2008 standard. Another commonly used base ten numeric representation is a packed decimal format referred to as binary coded decimal (BCD). In BCD format, a number is represented such that four bits of every byte are allocated to a single decimal digit. In DPD format, three decimal digits that normally take up twelve bits in a BCD encoding format are compacted into ten bits. To execute instructions/operations in a decimal floating-point-unit of a data processing system, data that is stored in DPD format is converted from DPD to BCD (sometimes referred to as DPD to BCD expansion). After the operation is executed on the BCD-formatted data, if desired, the data result may be converted from BCD to DPD (sometimes referred to as BCD to DPD compression).
During execution of a decimal floating point operation, an intermediate result of an operation may require rounding to maintain a target numerical precision. Depending on the rounding condition, rounding may either truncate a mantissa at a certain width or truncate the mantissa and increment the mantissa. If the mantissa is incremented, the rounded mantissa may gain an extra digit in width, which can cause the mantissa to exceed its maximal precision width. In such a case, a post-rounding correction process is performed on the mantissa overflow of the expected mantissa length (i.e., a carry-out to the next digit, which may be referred to as “overflow”) by, for example, dividing the mantissa by ten and incrementing an exponent value by one.